package com.ruoyi.system.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.vo.Dept;
import com.ruoyi.system.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DeptController extends BaseController {
    @Autowired
    private IDeptService deptService;

    @GetMapping("/dept")
    public TableDataInfo  selectDeptList(){
        List<Dept> depts = deptService.selectDeptList();
        return getDataTable(depts);
    }
}
